“The color to be used for the background.”
BackGround
set.seed(3-31-2016)
opar <- par(no.readonly=TRUE)
par(bg = "blue")
plot(rnorm(100))
par(bg = "#F0F0F0")
plot(rnorm(100))
par(bg = "#DCE6EC")
plot(rnorm(100))
“A string which determines the type of box which is drawn around plots.”
Box TYpe
par(bty = "o")
plot(rnorm(100))
par(bty = "l")
plot(rnorm(100))
par(bty = "7")
plot(rnorm(100))
par(bty = "c")
plot(rnorm(100))
par(bty = "u")
plot(rnorm(100))
par(bty = "]")
plot(rnorm(100))
par(bty = "n")
plot(rnorm(100))
“A number specifiying the amount by which plotting text and symbols should be magnified.”
Character EXpansion
par(cex = 2)
plot(rnorm(100))
par(cex = .5)
plot(rnorm(100))
“A number specifiying the amount by which plotting text and symbols should be magnified.”
Character EXpansion
par(cex = 1, cex.axis = 0.5)
plot(rnorm(100))
par(cex = 1, cex.axis = 2)
plot(rnorm(100))
par(cex = 1, cex.main = 0.5)
plot(rnorm(100))
par(cex = 1, cex.main = 2)
plot(rnorm(100))
“The name of a font family for drawing text.”
par(family = "mono")
plot(rnorm(100))
par(family = "serif")
plot(rnorm(100))
“The color to be used for the foreground of plots.”
ForeGround
par(fg = "red")
plot(rnorm(100))
“An integer which specifies which font to use.”
par(font = 2)
plot(rnorm(100))
mtext("Text")
par(font = 3)
plot(rnorm(100))
mtext("Text")
par(font = 4)
plot(rnorm(100))
mtext("Text")
par(font = 5)
plot(rnorm(100))
mtext("Text")
“A numerical vector of the form c(x, y, len) which modifies the default way that axes are annotated.”
LABel length
par(lab = c(10, 3, 7))
plot(rnorm(100))
par(lab = c(40, 20, 7))
plot(rnorm(100))
“The style of axis labels.”
LAbel Style
par(las = 0)
plot(rnorm(100))
par(las = 1)
plot(rnorm(100))
par(las = 2)
plot(rnorm(100))
par(las = 3)
plot(rnorm(100))
“The line type.”
Line TYpe
plot(rnorm(100), type = "l", lty = 2)
plot(rnorm(100), type = "l", lty = 3)
plot(rnorm(100), type = "l", lty = 6)
“The line width.”
Line WiDth
plot(rnorm(100), type = "l", lwd = 1)
plot(rnorm(100), type = "l", lwd = 2)
plot(rnorm(100), type = "l", lwd = 5)
“The margin size.”
MArgin sIze
par(mai = c(0, opar$mai[2:4]))
plot(rnorm(100))
par(mai = c(opar$mai[1], 0, opar$mai[3:4]))
plot(rnorm(100))
par(mai = c(opar$mai[1:2], 0, opar$mai[4]))
plot(rnorm(100))
par(mai = c(opar$mai[1:3], 0))
plot(rnorm(100))
“The number of margin lines on the four sides of the plot.”
MARrgin lines
par(mar = c(0, 4, 4, 2) + 0.1)
plot(rnorm(100))
par(mar = c(5, 0, 4, 2) + 0.1)
plot(rnorm(100))
par(mar = c(5, 4, 0, 2) + 0.1)
plot(rnorm(100))
par(mar = c(5, 4, 4, 0) + 0.1)
plot(rnorm(100))
“A vector of the form c(nr, nc). Subsequent figures will be drawn in an nr-by-nc array by columns (mfcol), or rows (mfrow), respectively.”
par(mfrow = c(2, 2))
replicate(4, plot(rnorm(100)))
## [[1]]
## NULL
##
## [[2]]
## NULL
##
## [[3]]
## NULL
##
## [[4]]
## NULL
par(mfrow = c(2, 1))
replicate(2, plot(rnorm(100)))
## [[1]]
## NULL
##
## [[2]]
## NULL
par(mfrow = c(1, 2))
replicate(2, plot(rnorm(100)))
## [[1]]
## NULL
##
## [[2]]
## NULL
par(mfrow = c(3, 2))
replicate(6, plot(rnorm(100)))
## [[1]]
## NULL
##
## [[2]]
## NULL
##
## [[3]]
## NULL
##
## [[4]]
## NULL
##
## [[5]]
## NULL
##
## [[6]]
## NULL
“The length of tick marks as a fraction of the height of a line of text.”
TiCk Line
par(tcl = 1)
plot(rnorm(100))
par(tcl = -1)
plot(rnorm(100))
par(tcl = -0.1)
plot(rnorm(100))